<style scoped>
    .dis {
        display: flex;
        justify-content: space-around;
    }
</style>
<template>
    <div>
        <div class="dis">
            <div>用户名：<input type="text" placeholder="请输入用户名" v-model="username"></div>
            <div>手机号：<input type="text" placeholder="请输入电话" v-model="iphone"></div>
        </div>
        <div>
            <button @click="clickSearch()" class="btn-default">搜索</button>
            <button @click="clickAdd" class="btn-default">添加用户</button>
        </div>
        <!-- 弹窗 -->
        <addUser :status="openOrclose" @clickParent="clickParent"></addUser>
    </div>
</template>
<script>
import addUser from './addUser'
export default {
    name: 'con',
    data () {
        return {
            username: '',
            iphone: '',
            openOrclose: false
        }
    },
    methods: {
        clickSearch () {
            let params = {}
            params.username = this.username
            params.iphone = this.iphone
            this.$emit('searchPara', params)
        },
        clickAdd () {
            this.openOrclose = !this.openOrclose
        },
        clickParent () {
            this.openOrclose = !this.openOrclose
        }
    },
    components: {
        addUser
    }
}
</script>


